(function() {"use strict";var __module = CC_EDITOR ? module : {exports:{}};var __filename = 'preview-scripts/assets/module/login/script/Login.js';var __require = CC_EDITOR ? function (request) {return cc.require(request, require);} : function (request) {return cc.require(request, __filename);};function __define (exports, require, module) {"use strict";
cc._RF.push(module, 'bbd0cRMLWtLD5GiOIaNWlB9', 'Login', __filename);
// module/login/script/Login.js

'use strict';

// let GameClient = 

var socket = require("socket.io");
cc.Class({
    extends: cc.Component,

    properties: {
        serverAddr: {
            default: ''
        },
        serverPort: {
            default: '24001'
        }
    },

    // use this for initialization
    onLoad: function onLoad() {
        // if (!cc.gameClient) {
        //     cc.gameClient = new GameClient()
        //     cc.gameClient.serverAddr = this.serverAddr
        //     cc.gameClient.serverPort = this.serverPort
        //     cc.gameClient.onLoad()
        // }
        //
        // this.errorLabel = cc.find("ErrorLabel")
        // // console.log("errorLabel", this.errorLabel, this.errorLabel.enabled)
        // // this.errorLabel.active = false
        // this.chatItems = new Array()

        var scene = cc.director.getScene();
        console.log("GoWorld onLoad: ", scene.name);

        // let s = new socket();
        // s.connect(this.serverAddr,this.serverPort)

        //    require("init")
    },
    login: function login() {
        var mobile = "15808479339";
        var password = "qqqqqq";
        window.HttpHelper.httpPost("http://127.0.0.1:8881/user", { mobile: mobile, password: password }, function (rsp) {
            cc.log([rsp, 199999]);
        });
    }

});

cc._RF.pop();
        }
        if (CC_EDITOR) {
            __define(__module.exports, __require, __module);
        }
        else {
            cc.registerModuleFunc(__filename, function () {
                __define(__module.exports, __require, __module);
            });
        }
        })();
        //# sourceMappingURL=Login.js.map
        